<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title></title>
</head>
<body>
<form action="{url:/exam/add}" method="post">
	用户名： <input type="text" name="name" id="name"><br>
	密码： <input type="password" name="pwd" id="pwd"><br>
	邮箱： <input type="text" name="email" id="email"><br>
	<input type="button" value="注册" id="btn" name="">
</form>
</body>
</html>
<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
<script type="text/javascript">
	$("#btn").click(function(){
		var name=$("#name").val();
		var pwd=$("pwd").val();
		var email=$("#email").val();
		if(name==''||pwd==''||email==''){
			alert("输入内容不能为空");
			return false;
		}
		var you=/^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/;
		if(!you.test(email)){
			alert('邮箱格式不正确');
			return false;
		}
		$("form").submit();
	});
</script>